#ifndef CONFIGUREDIALOG_H
#define CONFIGUREDIALOG_H

#include <qwidget.h>
#include "ui_configuredialog.h"
#include "bdaqctrl.h"
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <dirent.h>
#include <QFile>
#include <QTextStream>
#include <QDebug>
#include <cstdlib>
#include <ctime>
#include <typeinfo>
#include <string.h>
#include <curl/curl.h>
#include <unistd.h>
#include <string.h>

using namespace Automation::BDaq;

struct ConfigureParameter 
{
	QString deviceName;
	int channelCount;
	int channelStart;
	ValueRange valueRange;
	int32 clockRatePerChan;
	int32 sectionLength;
    QString profilePath;
};

class ConfigureDialog : public QDialog
{
	Q_OBJECT

public:
	ConfigureDialog(QDialog *parent = 0);
	~ConfigureDialog();
	void Initailization();
	void CheckError(ErrorCode errorCode);
	ConfigureParameter GetConfigureParameter(){return configure;}
	void RefreshConfigureParameter();
    void xml(QString Clock,QString Time,QString ip_adress,QString channelCount,QString channelStart,QString valueRange);


private:
	Ui::ConfigureDialog ui;
	ConfigureParameter configure;

    public slots:
		void DeviceChanged(int index);
		void ButtonOKClicked();
		void ButtonCancelClicked();
		void ButtonBrowseClicked();
        void on_login_clicked();
};

#endif // CONFIGUREDIALOG_H
